﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using XXTUserUI;

namespace MainFrame
{
    [Serializable]
    public class MotionPlate
    {

    }

    [Serializable]
    public class MotionConfig
    {
        public string rfid_mode { get; set; }


        public bool isOutDate1 { get; set; }
        /// <summary>
        /// 拍照定位各个坐标
        /// </summary>
        public List<AbsPostion> Plate1_pos { get; set; }
        /// <summary>
        /// 拍照定位各个坐标
        /// </summary>
        public List<AbsPostion> Plate2_pos { get; set; }
        /// <summary>
        /// 待镭雕处理
        /// </summary>
  
        /// <summary>
        /// 镭雕NG各个坐标
        /// </summary>
        public List<NGPostion> LaserNG_pos { get; set; }
        /// <summary>
        /// 延时停气1
        /// </summary>
         public int delayFlyStop1 { get; set; }
        /// <summary>
        /// 延时停气2
        /// </summary>
        public int delayFlyStop2 { get; set; }
        /// <summary>
        /// 飞达1超时报警
        /// </summary>
        public int Fly1TimeOutAlarm { get; set; }
        /// <summary>
        /// 飞达1超时报警
        /// </summary>
        public int Fly2TimeOutAlarm { get; set; }
        public int FlyStop1 { get; set; }
        /// <summary>
        /// 延时停气2
        /// </summary>
        public int FlyStop2 { get; set; }
        /// <summary>
        /// 平台1 安全位 X
        /// </summary>
        public double scanSafeX1 { get; set; }
        /// <summary>
        /// 平台2 安全位 X
        /// </summary>
        public double scanSafeX2 { get; set; }
        /// <summary>
        /// 创建模板参数
        /// </summary>
        public List< TemplateParam> TC_list{ get; set; }
        /// <summary>
        /// 模板匹配参数
        /// </summary>
        public List<TemplateFindParam> TF_list { get; set; }
        /// <summary>
        /// 撕膜处理
        /// </summary>
        public List<CutPostion> Cut_pos { get; set; }
        /// <summary>
        /// 上升松开产品的坐标
        /// </summary>
        public double ProZ_up { get; set; }
        /// <summary>
        /// 压住产品的坐标
        /// </summary>
        public double ProZ_down { get; set; }
       
        /// <summary>
        /// 盒子的读写
        /// </summary>
        public BoxReadInfo boxReadInfo { get; set; }
        /// <summary>
        /// 创建模板参数
        /// </summary>
        public List<MeasureParma> vision_M1_list { get; set; }
        /// <summary>
        /// 模板匹配参数
        /// </summary>
        public List<MeasureParma> vision_M2_list { get; set; }
        public CutParma cutParma1 { get; set; }
        public CutParma cutParma2 { get; set; }
        /// <summary>
        /// 平台1
        /// </summary>
        public VisionPos visionPutOK1 { get; set; }
        /// <summary>
        /// 平台2
        /// </summary>
        public VisionPos visionPutOK2 { get; set; }
        /// <summary>
        /// 平台1
        /// </summary>
        public VisionPos visionBase1 { get; set; }
        /// <summary>
        /// 平台2
        /// </summary>
        public VisionPos visionBase2 { get; set; }
        /// <summary>
        /// 平台1
        /// </summary>
        public VisionPos visionCenter1 { get; set; }
        /// <summary>
        /// 平台2
        /// </summary>
        public VisionPos visionCenter2 { get; set; }
        /// <summary>
        /// 延时夹
        /// </summary>
        public double clamp_Delay { get; set; }
        /// <summary>
        /// Z上下间隔时间
        /// </summary>
        public int CutNG_Delay { get; set; }
        /// <summary>
        /// Z上位置
        /// </summary>
        public double CutNG_LowZ { get; set; }
        /// <summary>
        /// Z下位置
        /// </summary>
        public double CutNG_HeightZ { get; set; }
        /// <summary>
        /// Z上下次数
        /// </summary>
        public int CutNG_time { get; set; }

        public double clamp_vel { get; set; }
        public int airCutTime { get; set; }

        public int fly1_Count { get; set; }
        public int fly2_Count { get; set; }

        public int fly1_AlarmCount { get; set; }
        public int fly2_AlarmCount { get; set; }

        public int flydelayCheck { get; set; }
        public double NGlabelZ { get; set; }
        /// <summary>
        /// 检测相机检测参数
        /// </summary>
        public VisionPostion posAfterLabel { get; set; }
        /// <summary>
        /// 定位直线1
        /// </summary>
        public List<LindFindParam> PosLindFind1 { get; set; }
        /// <summary>
        /// 定位直线2
        /// </summary>
        public List<LindFindParam> PosLindFind2 { get; set; }
        /// <summary>
        /// 定位相机抓鱼
        /// </summary>
        public List<CircleFindParam> PosCircleFindCheck1 { get; set; }
        /// <summary>
        /// 定位抓圆
        /// </summary>
        public List<CircleFindParam> PosCircleFindCheck2 { get; set; }
        /// <summary>
        /// 检测相机  抓圆
        /// </summary>
        public List<CircleFindParam> CircleFindCheck1 { get; set; }
        /// <summary>
        /// 检测相机抓鱼
        /// </summary>
        public List<CircleFindParam> CircleFindCheck2 { get; set; }
        public bool IsEnableLinePos { get; set; }

        /// <summary>
        /// 检测位Y
        /// </summary>
        public double checkPosY { get; set; }
        public double Up_checkPosY { get; set; }
        public double Down_checkPosY { get; set; }
        public bool IsEnableCircleCheck { get; set; }
        public drawInfo draw1 { get; set; }
        public drawInfo draw2 { get; set; }
        /// <summary>
        /// 定位相机OK图片文件夹
        /// </summary>
        public string dir_PosOK { get; set; }
        /// <summary>
        /// 定位相机OK图片文件夹
        /// </summary>
        public string dir_PosNG { get; set; }
        /// <summary>
        /// 图案相机OK图片文件夹
        /// </summary>
        public string dir_ScanOK { get; set; }
        /// <summary>
        /// 图案相机OK图片文件夹
        /// </summary>
        public string dir_ScanNG { get; set; }
        /// <summary>
        /// 检测相机OK图片文件夹
        /// </summary>
        public string dir_CheckOK { get; set; }
        /// <summary>
        /// 检测相机OK图片文件夹
        /// </summary>
        public string dir_CheckNG { get; set; }
        public double fly1AngelUnit { get; set; }
        public double fly1AngelStart { get; set; }
        public double fly1AngelEnd { get; set; }


        public double fly2AngelUnit { get; set; }
        public double fly2AngelStart { get; set; }
        public double fly2AngelEnd { get; set; }

        public int fly1Updeley { get; set; }
        public int fly2Updeley { get; set; }


        //20241210增加
        public string VisionPath { get; set; }




    }
    public class drawInfo
    {
        public int d_grayMax { get; set; }
        public int d_grayMin { get; set; }
        public int d_AreaMax { get; set; }
        public int d_AreaMin { get; set; }
    }
    [Serializable]
    public class CutPostion
    {
        /// <summary>
        /// x
        /// </summary>
        public double X { get; set; }
        /// <summary>
        /// Y
        /// </summary>
        public double Y { get; set; }
        /// <summary>
        /// Z
        /// </summary>
        public double Z { get; set; }
        /// <summary>
        /// R1
        /// </summary>
        public double R1 { get; set; }
        /// <summary>
        /// R2
        /// </summary>
        public double R2 { get; set; }

    }
    public enum e_Pos
    {
        飞达取标位,
        拍照位,
        拍照检测位,
        NG放标位,
        OK放标位,
        视觉补偿,
        拍照检测位上,
        拍照检测位下,
    }
    public enum e_PosNG
    {
        NG取工装位,
        NG放工装位
    }
    public enum e_PosLaser
    {
        待料位,
        取料位,
        待镭雕位
    }
    [Serializable]
    public class LaserGetPut
    {
        /// <summary>
        /// 镭雕取料Z坐标
        /// </summary>
        public double GetPosZ { get; set; }
        /// <summary>
        /// 镭雕取料R坐标
        /// </summary>
        public double GetPosR { get; set; }
        /// <summary>
        /// 镭雕等待位Z
        /// </summary>
        public double WaitPosZ { get; set; }
        /// <summary>
        /// 镭雕位Z
        /// </summary>
        public double PutPosZ { get; set; }
        /// <summary>
        /// 镭雕位R
        /// </summary>
        public double PutPosR { get; set; }
      
    }
    [Serializable]
    public class LaserPos
    {
        /// <summary>
        /// 镭雕取料Z坐标
        /// </summary>
        public double X { get; set; }
        /// <summary>
        /// 镭雕取料R坐标
        /// </summary>
        public double Y { get; set; }
       

    }
  
    [Serializable]
    public class VisionPos
    {
        /// <summary>
        /// 补偿X
        /// </summary>
        public double X { get; set; }
        /// <summary>
        /// 补偿Y
        /// </summary>
        public double Y { get; set; }
        /// <summary>
        /// 补偿R
        /// </summary>
        public double R { get; set; }


    }
}
